1. Field of the Invention
This invention relates to data storage and processing and more particularly relates to enqueue prioritization.
2. Description of the Related Art
A queue is an abstract data structure commonly used in computing systems to store various computing entities such as data, objects, packets, or the like and hold those entities for later processing. Typically entities held in the queue are arranged or ordered as a function of the enqueue order. An enqueue operation enters an entity into a queue, and a dequeue operation removes an entity from the queue. Various other queue operations may including move operations, copy operations, sort operations, and the like. In a typical queue, entities are ordered according to a First In First Out (FIFO) scheme. Another common queuing scheme is First In Last Out (FILO), where the first entity enqueue is the last entity to be dequeue.
Structurally, a queue is commonly implemented in a data buffer, data register, Random Access Memory (RAM), or the like. Often, a queue includes a physical volume for storing entities, and a separate or associated volume for storing a logical arrangement of the entities. For example, it is common to queue entities such as application calls to a particular application process. Data objects representing the application calls are commonly stored in a RAM volume, and a register or separate location in the RAM stores pointers to the locations of the various data objects within the RAM volume. The pointers are often arranged in a FIFO stack or queue. As a data object is dequeued from the FIFO queue, the application call associated with the data object is executed.
One common issue that arises in the field of data processing involves difficulties with queuing when entities of different priorities are involved. For example, in a database system, access to the database is typically queued. In these systems, standard FIFO queues for queuing access to the database may be undesirable, because certain applications that request access to the database have higher priority needs than other applications. In this example, an online banking application requesting access to the database for the purpose of updating a customer's account would typically have a higher priority than a disk consolidation application requesting access to the database for maintenance purposes. Moreover, in this example, the update may take a short amount of time, but the disk consolidation may consume a large amount of time. It wouldn't make sense to have the higher priority online banking application waiting up to several hours for the disk consolidation application.
In response to this problem, priority queuing has been developed. Priority queuing typically assigns a priority value to an entity as it is enqueued. In the example above, the online banking application may be assigned a priority value of five, whereas the disk consolidation application may be assigned a priority value of one. Therefore, the online banking application would move ahead of the disk consolidation application in the queue to access the database. In other words, the online banking application would not have to wait for the disk consolidation application to be able to access the database.